package com.htstar.ovms.job.job;


import com.htstar.ovms.common.core.constant.SecurityConstants;
import com.htstar.ovms.device.api.feign.DeviceLastDataFeign;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import static com.xxl.job.core.biz.model.ReturnT.SUCCESS;

@Slf4j
@Component
public class OBDCommand {

    @Autowired
    DeviceLastDataFeign deviceLastDataFeign;

    @XxlJob("OBDCommand")
    public ReturnT<String> OBDCommand(String s) {
        deviceLastDataFeign.obdOtaUpdate(SecurityConstants.FROM_IN);
        System.out.println("监控OBDCommand");
        return SUCCESS;
    }
}
